.class Lcom/burstly/lib/component/AdaptorController$ParseParamsAsyncTask;
.super Lcom/burstly/lib/network/request/SafeAsyncTask;
.source "AdaptorController.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/burstly/lib/component/AdaptorController;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = "ParseParamsAsyncTask"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/burstly/lib/network/request/SafeAsyncTask",
        "<",
        "Lcom/burstly/lib/network/ResponseObject;",
        ">;"
    }
.end annotation


# instance fields
.field private final mController:Ljava/lang/ref/Reference;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/ref/Reference",
            "<",
            "Lcom/burstly/lib/component/AdaptorController;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method constructor <init>(Lcom/burstly/lib/component/AdaptorController;)V
    .locals 1
    .parameter "comp"

    .prologue
    .line 779
    invoke-direct {p0}, Lcom/burstly/lib/network/request/SafeAsyncTask;-><init>()V

    .line 780
    new-instance v0, Ljava/lang/ref/WeakReference;

    invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    iput-object v0, p0, Lcom/burstly/lib/component/AdaptorController$ParseParamsAsyncTask;->mController:Ljava/lang/ref/Reference;

    .line 781
    return-void
.end method


# virtual methods
.method protected onPostExecute(Lcom/burstly/lib/network/ResponseObject;)V
    .locals 6
    .parameter "result"

    .prologue
    const/4 v5, 0x0

    .line 795
    iget-object v2, p0, Lcom/burstly/lib/component/AdaptorController$ParseParamsAsyncTask;->mController:Ljava/lang/ref/Reference;

    invoke-virtual {v2}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/burstly/lib/component/AdaptorController;

    .line 796
    .local v0, controller:Lcom/burstly/lib/component/AdaptorController;
    if-nez v0, :cond_0

    .line 821
    :goto_0
    return-void

    .line 799
    :cond_0
    iget-boolean v2, v0, Lcom/burstly/lib/component/AdaptorController;->mDestroyed:Z

    if-nez v2, :cond_2

    .line 800
    invoke-virtual {v0, p1}, Lcom/burstly/lib/component/AdaptorController;->fillUpWithCurrentResponseData(Lcom/burstly/lib/network/ResponseObject;)V

    .line 802
    :try_start_0
    invoke-virtual {v0, p1}, Lcom/burstly/lib/component/AdaptorController;->beginTransaction(Lcom/burstly/lib/network/ResponseObject;)V

    .line 803
    invoke-virtual {v0}, Lcom/burstly/lib/component/AdaptorController;->setAdaptorListener()V

    .line 804
    invoke-virtual {v0, p1}, Lcom/burstly/lib/component/AdaptorController;->isContinueProcessing(Lcom/burstly/lib/network/ResponseObject;)Z

    move-result v2

    if-eqz v2, :cond_1

    .line 805
    iget-object v2, v0, Lcom/burstly/lib/component/AdaptorController;->mDebugger:Lcom/burstly/lib/util/Utils$DebugWrapper;

    invoke-virtual {v2}, Lcom/burstly/lib/util/Utils$DebugWrapper;->logAll()V

    .line 806
    invoke-static {v0}, Lcom/burstly/lib/component/AdaptorController;->handleServerResponse(Lcom/burstly/lib/component/AdaptorController;)V
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 815
    :catch_0
    move-exception v1

    .line 816
    .local v1, exc:Ljava/lang/Throwable;
    invoke-static {v0, v1}, Lcom/burstly/lib/component/AdaptorController;->handleErrorFlow(Lcom/burstly/lib/component/AdaptorController;Ljava/lang/Throwable;)V

    goto :goto_0

    .line 808
    .end local v1           #exc:Ljava/lang/Throwable;
    :cond_1
    :try_start_1
    sget-object v2, Lcom/burstly/lib/component/AdaptorController;->LOG:Lcom/burstly/lib/util/LoggerExt;

    iget-object v3, v0, Lcom/burstly/lib/component/AdaptorController;->mTag:Ljava/lang/String;

    const-string v4, "Parsed response is null or parameters for this network are incorrect."

    const/4 v5, 0x0

    new-array v5, v5, [Ljava/lang/Object;

    invoke-virtual {v2, v3, v4, v5}, Lcom/burstly/lib/util/LoggerExt;->logError(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 810
    iget-object v2, v0, Lcom/burstly/lib/component/AdaptorController;->mAdaptorListener:Lcom/burstly/lib/component/AdaptorListener;

    iget-object v3, v0, Lcom/burstly/lib/component/AdaptorController;->mNetworkName:Ljava/lang/String;

    iget-boolean v4, v0, Lcom/burstly/lib/component/AdaptorController;->mIsInterstitial:Z

    const-string v5, "Unsupported operation"

    invoke-virtual {v2, v3, v4, v5}, Lcom/burstly/lib/component/AdaptorListener;->failedToLoad(Ljava/lang/String;ZLjava/lang/String;)V

    .line 812
    iget-object v2, v0, Lcom/burstly/lib/component/AdaptorController;->mParent:Lcom/burstly/lib/ui/BurstlyView;

    sget-object v3, Lcom/burstly/lib/ui/LastBurstlyError;->ERROR_PROCESSING_PARAMS:Lcom/burstly/lib/ui/LastBurstlyError;

    invoke-virtual {v2, v3}, Lcom/burstly/lib/ui/BurstlyView;->setLastError(Lcom/burstly/lib/ui/LastBurstlyError;)V
    :try_end_1
    .catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0

    .line 819
    :cond_2
    sget-object v2, Lcom/burstly/lib/component/AdaptorController;->LOG:Lcom/burstly/lib/util/LoggerExt;

    iget-object v3, v0, Lcom/burstly/lib/component/AdaptorController;->mTag:Ljava/lang/String;

    const-string v4, "Old Burstly View has been destroyed so safely skip rest of lifecycle."

    new-array v5, v5, [Ljava/lang/Object;

    invoke-virtual {v2, v3, v4, v5}, Lcom/burstly/lib/util/LoggerExt;->logWarning(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    goto :goto_0
.end method

.method protected bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 767
    check-cast p1, Lcom/burstly/lib/network/ResponseObject;

    .end local p1
    invoke-virtual {p0, p1}, Lcom/burstly/lib/component/AdaptorController$ParseParamsAsyncTask;->onPostExecute(Lcom/burstly/lib/network/ResponseObject;)V

    return-void
.end method

.method protected performInBackground()Lcom/burstly/lib/network/ResponseObject;
    .locals 2

    .prologue
    .line 785
    iget-object v1, p0, Lcom/burstly/lib/component/AdaptorController$ParseParamsAsyncTask;->mController:Ljava/lang/ref/Reference;

    invoke-virtual {v1}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/burstly/lib/component/AdaptorController;

    .line 786
    .local v0, comp:Lcom/burstly/lib/component/AdaptorController;
    if-nez v0, :cond_0

    .line 787
    const/4 v1, 0x0

    .line 790
    :goto_0
    return-object v1

    .line 789
    :cond_0
    invoke-super {p0}, Lcom/burstly/lib/network/request/SafeAsyncTask;->performInBackground()Ljava/lang/Object;

    .line 790
    invoke-virtual {v0}, Lcom/burstly/lib/component/AdaptorController;->getCurrentAdData()Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;

    move-result-object v1

    invoke-virtual {v1}, Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;->getParms()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lcom/burstly/lib/util/Utils;->get3rdPartySdkParams(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lcom/burstly/lib/util/Utils;->fromJson(Ljava/lang/String;)Lcom/burstly/lib/network/ResponseObject;

    move-result-object v1

    goto :goto_0
.end method

.method protected bridge synthetic performInBackground()Ljava/lang/Object;
    .locals 1

    .prologue
    .line 767
    invoke-virtual {p0}, Lcom/burstly/lib/component/AdaptorController$ParseParamsAsyncTask;->performInBackground()Lcom/burstly/lib/network/ResponseObject;

    move-result-object v0

    return-object v0
.end method
